import QtQuick
import QtQuick.Controls

Item {
    id: connectParametersWindow
    width: 1900
    height: 920

    Rectangle{
        anchors.fill: parent
        radius: 5
        // //border.width: 1
        // border.color: "black"
        color: "#87CEEB"
    }

    Rectangle{
        anchors.top: connectParametersWindow.top
        anchors.topMargin: 10
        anchors.horizontalCenter: scannerInputColumn.horizontalCenter
        width: 150
        height: 50
        color: "transparent"
        Text{
            anchors.centerIn: parent
            font.pixelSize: 30
            text: qsTr("扫码枪属性")
        }
    }

    Column{
        id: scannerInputColumn
        anchors.left: connectParametersWindow.left
        anchors.leftMargin: 20
        anchors.top: connectParametersWindow.top
        anchors.topMargin: 80

        Row{
            Rectangle{
                width: 150
                height: 50
                color: "transparent"
                Text{
                    anchors.centerIn: parent
                    font.pixelSize: 30
                    text: qsTr("端口号")
                }
            }
            A_TextInput{
                isPassword: false
                text: initData.scanner_Port
                onEditingFinished: function(finalValue){
                    console.log("输入: " + finalValue)
                    initData.scanner_Port = finalValue
                }
            }


        }
        Row{
            Rectangle{
                width: 150
                height: 50
                color: "transparent"
                Text{
                    anchors.centerIn: parent
                    font.pixelSize: 30
                    text: qsTr("波特率")
                }
            }
            A_TextInput{
                isPassword: false
                text: initData.scanner_BaudRate
                onEditingFinished: function(finalValue){
                    console.log("输入: " + finalValue)
                    initData.scanner_BaudRate = finalValue;
                }
            }
        }
        Row{
            Rectangle{
                width: 150
                height: 50
                color: "transparent"
                Text{
                    anchors.centerIn: parent
                    font.pixelSize: 30
                    text: qsTr("数据位")
                }
            }
            A_TextInput{
                isPassword: false
                text: initData.scanner_DataBit
                onEditingFinished: function(finalValue){
                    console.log("输入: " + finalValue)
                    initData.scanner_DataBit = finalValue;
                }
            }
        }
        Row{
            Rectangle{
                width: 150
                height: 50
                color: "transparent"
                Text{
                    anchors.centerIn: parent
                    font.pixelSize: 30
                    text: qsTr("校验位")
                }
            }
            A_TextInput{
                isPassword: false
                text: initData.scanner_Parity
                onEditingFinished: function(finalValue){
                    console.log("输入: " + finalValue)
                    initData.scanner_Parity = finalValue;
                }
            }
        }
        Row{
            Rectangle{
                width: 150
                height: 50
                color: "transparent"
                Text{
                    anchors.centerIn: parent
                    font.pixelSize: 30
                    text: qsTr("停止位")
                }
            }
            A_TextInput{
                isPassword: false
                text: initData.scanner_StopBit
                onEditingFinished: function(finalValue){
                    console.log("输入: " + finalValue)
                    initData.scanner_StopBit = finalValue;
                }
            }
        }

    }




    Rectangle{
        anchors.top: connectParametersWindow.top
        anchors.topMargin: 10
        anchors.horizontalCenter: printerInputColumn.horizontalCenter
        width: 150
        height: 50
        color: "transparent"
        Text{
            anchors.centerIn: parent
            font.pixelSize: 30
            text: qsTr("打印机属性")
        }
    }




    Column{
        id: printerInputColumn
        anchors.left: connectParametersWindow.left
        anchors.leftMargin: 550
        anchors.top: connectParametersWindow.top
        anchors.topMargin: 80

        Row{
            Rectangle{
                width: 150
                height: 50
                color: "transparent"
                Text{
                    anchors.centerIn: parent
                    font.pixelSize: 30
                    text: qsTr("端口号")
                }
            }
            A_TextInput{
                isPassword: false
                text: initData.printer_Port
                onEditingFinished: function(finalValue){
                    console.log("输入: " + finalValue)
                    initData.printer_Port = finalValue;
                }
            }
        }
        Row{
            Rectangle{
                width: 150
                height: 50
                color: "transparent"
                Text{
                    anchors.centerIn: parent
                    font.pixelSize: 30
                    text: qsTr("波特率")
                }
            }
            A_TextInput{
                isPassword: false
                text: initData.printer_BaudRate
                onEditingFinished: function(finalValue){
                    console.log("输入: " + finalValue)
                    initData.printer_BaudRate = finalValue;
                }
            }
        }
        Row{
            Rectangle{
                width: 150
                height: 50
                color: "transparent"
                Text{
                    anchors.centerIn: parent
                    font.pixelSize: 30
                    text: qsTr("数据位")
                }
            }
            A_TextInput{
                isPassword: false
                text: initData.printer_DataBit
                onEditingFinished: function(finalValue){
                    console.log("输入: " + finalValue)
                    initData.printer_DataBit = finalValue;
                }
            }
        }
        Row{
            Rectangle{
                width: 150
                height: 50
                color: "transparent"
                Text{
                    anchors.centerIn: parent
                    font.pixelSize: 30
                    text: qsTr("校验位")
                }
            }
            A_TextInput{
                isPassword: false
                text: initData.printer_Parity
                onEditingFinished: function(finalValue){
                    console.log("输入: " + finalValue)
                    initData.printer_Parity = finalValue;
                }
            }
        }
        Row{
            Rectangle{
                width: 150
                height: 50
                color: "transparent"
                Text{
                    anchors.centerIn: parent
                    font.pixelSize: 30
                    text: qsTr("停止位")
                }
            }
            A_TextInput{
                isPassword: false
                text: initData.printer_StopBit
                onEditingFinished: function(finalValue){
                    console.log("输入: " + finalValue)
                    initData.printer_StopBit = finalValue;
                }
            }
        }

    }



}
